home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Freeware
/
First Page 2006 3.00
/
fp2006-final-3.00-setup.exe
/
{app}
/
Iscripts
/
Equivalents
/
instance-counter.izs
< prev
next >
Wrap
Text File
|
2005-09-27
|
3KB
|
93 lines
<!NOWIZARD>
<!TITLE>Instance Counter
<!/TITLE>
<!DESCRIPTION>This script doesnt only count the words but it can also count how many times the word is used!<!/DESCRIPTION>
<!CATEGORY>Equivalents<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL INSTANCE COUNTER:
1. Copy code into the HEAD section of document
2. Put last coding into the BODY section of document -->
<!-- STEP ONE: Add code into HEAD section of document -->
<HEAD>
<!-- Original: Philip Peterson (IronMagma@hotmail.com) -->
<!-- Web Site: http://www.ironmagma.tk -->
<script language=javascript>
<!--
function countInstances(element,word) {
montage=element.split(word).length-1;
if(montage==0){montage="no"}
if(montage==1){alert("The selection specified contains 1 instance of the phrase \""+word+"\".")}
else{alert("The selection specified contains "+montage+" instances of the phrase \""+word+"\".")}
}
//-->
</script>
</HEAD>
<!-- STEP TWO: Add code into BODY section of document -->
<BODY>
<!-- Original: Philip Peterson (IronMagma@hotmail.com) -->
<!-- Web Site: http://www.ironmagma.tk -->
<textarea id=area>This is where your text goes. It will search for instances of 'text'</textarea>
<input type=submit onClick="countInstances(document.all.area.value,'text')" value="Count!">
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL INSTANCE COUNTER:
1. Copy code into the HEAD section of document
2. Put last coding into the BODY section of document -->
<!-- STEP ONE: Add code into HEAD section of document -->
<HEAD>
<!-- Original: Philip Peterson (IronMagma@hotmail.com) -->
<!-- Web Site: http://www.ironmagma.tk -->
<script language=javascript>
<!--
function countInstances(element,word) {
montage=element.split(word).length-1;
if(montage==0){montage="no"}
if(montage==1){alert("The selection specified contains 1 instance of the phrase \""+word+"\".")}
else{alert("The selection specified contains "+montage+" instances of the phrase \""+word+"\".")}
}
//-->
</script>
</HEAD>
<!-- STEP TWO: Add code into BODY section of document -->
<BODY>
<!-- Original: Philip Peterson (IronMagma@hotmail.com) -->
<!-- Web Site: http://www.ironmagma.tk -->
<textarea id=area>This is where your text goes. It will search for instances of 'text'</textarea>
<input type=submit onClick="countInstances(document.all.area.value,'text')" value="Count!">
<!-- END OF SCRIPT -->
<!/PREVIEW>
<!RELATED>NONE<!/RELATED>